home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 8 / cdrt08.iso / mac / Shareware / HyperCard / demoCdef 120 ƒ / demo Source ƒ / jimsCDEF.h < prev    next >
Encoding:
Text File  |  1994-12-12  |  4.6 KB  |  132 lines  |  [TEXT/KAHL]

  1. // -----------------------------------------------------------------------------
  2. //    File        : jimsCDEF.h
  3. //    Date        : September 24, 1994
  4. //    Author        : Jim Stout
  5. //    Purpose        : Various #defines and structs useful with the CDEF's
  6. // -----------------------------------------------------------------------------
  7.  
  8. // -----------------------------------------------------------------------------
  9. // the resource id's for the CDEFS
  10. // -----------------------------------------------------------------------------
  11. #define groupBox    100
  12. #define popUp        101
  13. #define spinner        102
  14. #define dateTime    103
  15. #define hSlider        105
  16. #define vSlider        106
  17. #define button3D    0        // 107    // set to 0 to override System CDEF
  18. #define progBar        108
  19. #define tabPanel    109
  20.  
  21. // -----------------------------------------------------------------------------
  22. // varCodes for all CDEFS
  23. // -----------------------------------------------------------------------------
  24.  
  25. #define ctl3D            2            // 3D control appearance
  26. #define useWFont        8            // draw control with window font
  27.  
  28. // -----------------------------------------------------------------------------
  29. // varCodes for popUp CDEF
  30. // -----------------------------------------------------------------------------
  31.  
  32. #ifndef popupTitleLeftJust
  33.  
  34. // special meanings for contrlValue field
  35.  
  36. #define popupTitleLeftJust        0x00000000
  37. #define popupTitleCenterJust    0x00000001
  38. #define popupTitleRightJust        0x000000FF
  39.  
  40. // variation codes
  41.  
  42. #define popupFixedWidth            1
  43. #define popupUseAddResMenu        4
  44. #define popupUseWFont            8
  45.  
  46. #endif
  47.  
  48. // -----------------------------------------------------------------------------
  49. // varCodes for spinner CDEF
  50. // -----------------------------------------------------------------------------
  51.  
  52. #define bigArrows        1
  53.  
  54. #define aHt        18        // minimum height & width for arrows
  55. #define aWid    11
  56. #define aHtBig    25
  57. #define aWidBig    15
  58. // -----------------------------------------------------------------------------
  59. // varCodes for dateTime CDEF
  60. // -----------------------------------------------------------------------------
  61.  
  62. #define dateOnly        1            // show date, left justified in control rect    
  63. #define timeOnly        2            // show time, right justified in control rect    
  64. #define dtStack            4            // show both on 2 lines, date then time    
  65.  
  66. // -----------------------------------------------------------------------------
  67. // varCodes for hSlider CDEF
  68. // -----------------------------------------------------------------------------
  69.  
  70. #define scaleNoFill      1
  71. #define scaleGray        4
  72.  
  73. // -----------------------------------------------------------------------------
  74. // varCodes for vSlider CDEF
  75. // -----------------------------------------------------------------------------
  76.  
  77. #define scaleNoFill      1
  78. #define thumbNoSnap        4
  79. #define scaleBlank        8
  80.  
  81. // -----------------------------------------------------------------------------
  82. // varCodes for button3D CDEF
  83. // -----------------------------------------------------------------------------
  84.  
  85. #define togButton        4
  86.  
  87. // -----------------------------------------------------------------------------
  88. // varCodes for progBar CDEF
  89. // -----------------------------------------------------------------------------
  90.  
  91. #define vertBar            1
  92. #define roundBar        2
  93. #define barberPole        4
  94.  
  95. // -----------------------------------------------------------------------------
  96. // varCodes for tabPanel CDEF
  97. // -----------------------------------------------------------------------------
  98.  
  99. #define sysFontTabs        1
  100. #define oneTabRow        2
  101.  
  102. // -----------------------------------------------------------------------------
  103. // other stuff
  104. // -----------------------------------------------------------------------------
  105.  
  106. #define only24        1            // force dateTime CDEF to 24 hour time display
  107.  
  108. #ifndef REZ
  109. //------------------------------------------------------------------------------
  110. // Spinner CDEF private data structure    
  111. //      increment and DITL itemNum are passed into the control as 
  112. //        LoWord & HiWord of the control RefCon            
  113. //------------------------------------------------------------------------------
  114.  
  115. typedef struct {
  116. short        increment;            // initial, requested increment value    
  117. short        itemNum;            // DITL editText item number for call to SetIText
  118. long        userData;            // user supplied data
  119. }Spin,*SpinPtr,**SpinHandle;
  120.  
  121. //------------------------------------------------------------------------------
  122. // Popup Menu CDEF private data structure    
  123. //  N.B. : The following structure is NOT the same as Apple's.
  124. //            It does match, for the first 2 elements.
  125. //------------------------------------------------------------------------------
  126.             
  127. typedef struct{
  128. MenuHandle    mHandle;                        // handle to the menu         
  129. int            mId;                            // resource id of menu        
  130. }popUpPrivateData,**popUpPrivateDataH;
  131.  
  132. #endif // REZ